//
//  AppDelegate.swift
//  KCSwift
//
//  Created by apple on 2023/7/21.
//

import UIKit
//import AppTrackingTransparency



@main
class AppDelegate: UIResponder, UIApplicationDelegate {


    var window: UIWindow?
    var ffTab:FFTabBarViewController?
    
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        window = UIWindow.init(frame: UIScreen.main.bounds);
        let nvc = UINavigationController.init(rootViewController: HomeViewController())
        window?.rootViewController = nvc;
        
//        if ffTab == nil {
//            ffTab = FFTabBarViewController.init()
//        }
//        let nvc = UINavigationController.init(rootViewController: ffTab!)
//        window?.rootViewController = nvc;
//        window?.makeKeyAndVisible()

        
        
        
        return true
    }

    
    func applicationDidBecomeActive(_ application: UIApplication) {
//        getATTracking()
    }
    
    /// 申请 IDFA 权限
//    private func getATTracking() {
//        if #available(iOS 14, *) {
//            DispatchQueue.global().asyncAfter(deadline: DispatchTime.now()) {
//                ATTrackingManager.requestTrackingAuthorization { status in
//                    debugPrint("iOS 获取用户 IDFA 追踪权限：\(status.rawValue)")
//                    // 此处可以执行其他操作，需要注意线程
//                }
//            }
//        }
//    }

}

